<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="maven打包,xjar打包," />










<meta name="description" content="环境构建1.安装go环境1yum -y install go   2.安装java环境1yum -y install java-1.8.0-openjdk*  3.安装maven下载安装基础环境 12wget http:&#x2F;&#x2F;repos.fedorapeople.org&#x2F;repos&#x2F;dchen&#x2F;apache-maven&#x2F;epel-apache-maven.repo -O &#x2F;etc&#x2F;yum.repos">
<meta property="og:type" content="article">
<meta property="og:title" content="打包环境构建">
<meta property="og:url" content="https://luoyezadi.gitee.io/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/%E6%89%93%E5%8C%85%E7%8E%AF%E5%A2%83%E6%9E%84%E5%BB%BA/2023/08/01/index.html">
<meta property="og:site_name" content="落叶砸地">
<meta property="og:description" content="环境构建1.安装go环境1yum -y install go   2.安装java环境1yum -y install java-1.8.0-openjdk*  3.安装maven下载安装基础环境 12wget http:&#x2F;&#x2F;repos.fedorapeople.org&#x2F;repos&#x2F;dchen&#x2F;apache-maven&#x2F;epel-apache-maven.repo -O &#x2F;etc&#x2F;yum.repos">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2023-08-01T08:46:33.836Z">
<meta property="article:modified_time" content="2023-08-01T08:46:33.836Z">
<meta property="article:author" content="LZH">
<meta property="article:tag" content="maven打包">
<meta property="article:tag" content="xjar打包">
<meta name="twitter:card" content="summary">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://luoyezadi.gitee.io/技术文档/打包环境构建/2023/08/01/"/>





  <title>打包环境构建 | 落叶砸地</title>
  








<meta name="generator" content="Hexo 5.4.2"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">落叶砸地</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">java,web,树莓派,花生壳</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/%20" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/%20" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://luoyezadi.gitee.io/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/%E6%89%93%E5%8C%85%E7%8E%AF%E5%A2%83%E6%9E%84%E5%BB%BA/2023/08/01/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="落叶砸地">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">打包环境构建</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2023-08-01T16:46:33+08:00">
                2023-08-01
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/maven%E6%89%93%E5%8C%85/" itemprop="url" rel="index">
                    <span itemprop="name">maven打包</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="环境构建"><a href="#环境构建" class="headerlink" title="环境构建"></a>环境构建</h2><h3 id="1-安装go环境"><a href="#1-安装go环境" class="headerlink" title="1.安装go环境"></a>1.安装go环境</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum -y install go</span><br></pre></td></tr></table></figure>


<h3 id="2-安装java环境"><a href="#2-安装java环境" class="headerlink" title="2.安装java环境"></a>2.安装java环境</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum -y install java-1.8.0-openjdk*</span><br></pre></td></tr></table></figure>

<h3 id="3-安装maven"><a href="#3-安装maven" class="headerlink" title="3.安装maven"></a>3.安装maven</h3><p>下载安装基础环境</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo</span><br><span class="line">yum install -y maven</span><br></pre></td></tr></table></figure>

<p>配置文件路径：<br>  /etc/maven/settings.xml</p>
<p>添加maven资源镜像</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">mirror</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">id</span>&gt;</span>nexus-aliyun<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">mirrorOf</span>&gt;</span>central<span class="tag">&lt;/<span class="name">mirrorOf</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">name</span>&gt;</span>Nexus aliyun<span class="tag">&lt;/<span class="name">name</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">url</span>&gt;</span>http://maven.aliyun.com/nexus/content/groups/public<span class="tag">&lt;/<span class="name">url</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">mirror</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">mirror</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">id</span>&gt;</span>mirrorId<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">mirrorOf</span>&gt;</span>repositoryId<span class="tag">&lt;/<span class="name">mirrorOf</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">name</span>&gt;</span>Human Readable Name for this Mirror.<span class="tag">&lt;/<span class="name">name</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">url</span>&gt;</span>http://my.repository.com/repo/path<span class="tag">&lt;/<span class="name">url</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">mirror</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="4-授权sudo免密执行"><a href="#4-授权sudo免密执行" class="headerlink" title="4.授权sudo免密执行"></a>4.授权sudo免密执行</h3><p>tips:另外一个选择是将对应目录权限设置777</p>
<p>需要高权限命令时需要修改gitlab-runner用户权限</p>
<p>编辑文件，/etc/sudoers 文件，然后在如下 root 的下一行增加如下一行</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># Allow root to run any commands anywhere</span></span></span><br><span class="line">root    ALL=(ALL)       ALL</span><br><span class="line">gitlab-runner ALL=(ALL) NOPASSWD:ALL</span><br></pre></td></tr></table></figure>

<p>5.最终.gitlab-ci.yml文件例子</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">variables:</span></span><br><span class="line">  <span class="attr">MAVEN_OPTS:</span> <span class="string">&quot;-Dmaven.repo.local=../.m2/repository&quot;</span></span><br><span class="line">  <span class="attr">PACKAGE_PATH:</span> <span class="string">&quot;/data/lzh/package/jwcloud-test/&quot;</span></span><br><span class="line"><span class="attr">cache:</span></span><br><span class="line">  <span class="attr">paths:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">../.m2/repository</span></span><br><span class="line"><span class="attr">stages:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">build</span></span><br><span class="line"><span class="comment"># 打包镜像</span></span><br><span class="line"><span class="attr">build:</span></span><br><span class="line">  <span class="attr">stage:</span> <span class="string">build</span></span><br><span class="line">  <span class="attr">only:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">master</span></span><br><span class="line">  <span class="attr">script:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">mvn</span> <span class="string">$MAVEN_OPTS</span> <span class="string">clean</span> <span class="string">package</span> <span class="string">-Dxjar.password=123123</span> <span class="string">&#x27;-Dmaven.test.skip=true&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">cd</span> <span class="string">target</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">export</span> <span class="string">GOOS=windows</span> <span class="string">&amp;&amp;</span> <span class="string">go</span> <span class="string">build</span> <span class="string">xjar.go</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">sudo</span> <span class="string">mkdir</span> <span class="string">-p</span> <span class="string">$PACKAGE_PATHservice/</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">sudo</span> <span class="string">mv</span> <span class="string">-f</span> <span class="string">xjar.exe</span> <span class="string">$&#123;PACKAGE_PATH&#125;service/jwcloud.exe</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">sudo</span> <span class="string">mv</span> <span class="string">-f</span> <span class="string">*.xjar</span> <span class="string">$&#123;PACKAGE_PATH&#125;service/jwcloud.xjar</span></span><br><span class="line"><span class="comment">#  artifacts:</span></span><br><span class="line"><span class="comment">#    paths:</span></span><br><span class="line"><span class="comment">#      - &quot;target/jwcloud.exe&quot;</span></span><br><span class="line"><span class="comment">#      - &quot;target/jwcloud.xjar&quot;</span></span><br></pre></td></tr></table></figure>



<h2 id="优化：增加sonar扫描"><a href="#优化：增加sonar扫描" class="headerlink" title="优化：增加sonar扫描"></a>优化：增加sonar扫描</h2><p>参照 <a href="sonar%E7%8E%AF%E5%A2%83%E9%83%A8%E7%BD%B2.md">sonar环境部署.md</a> 中maven-sonar 插件配置maven和修改脚本</p>
<p>命令在最后加上sonar:sonar即可</p>
<p>如下</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">variables:</span></span><br><span class="line">  <span class="attr">MAVEN_OPTS:</span> <span class="string">&quot;-Dmaven.repo.local=../.m2/repository&quot;</span></span><br><span class="line">  <span class="attr">PACKAGE_PATH:</span> <span class="string">&quot;/data/lzh/package/jwcloud-test/&quot;</span></span><br><span class="line"><span class="attr">cache:</span></span><br><span class="line">  <span class="attr">paths:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">../.m2/repository</span></span><br><span class="line"><span class="attr">stages:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">build</span></span><br><span class="line"><span class="comment"># 打包镜像</span></span><br><span class="line"><span class="attr">build:</span></span><br><span class="line">  <span class="attr">stage:</span> <span class="string">build</span></span><br><span class="line">  <span class="attr">only:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">master</span></span><br><span class="line">  <span class="attr">script:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">mvn</span> <span class="string">$MAVEN_OPTS</span> <span class="string">clean</span> <span class="string">package</span> <span class="string">-Dxjar.password=123123</span> <span class="string">&#x27;-Dmaven.test.skip=true&#x27;</span> <span class="string">sonar:sonar</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">cd</span> <span class="string">target</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">export</span> <span class="string">GOOS=windows</span> <span class="string">&amp;&amp;</span> <span class="string">go</span> <span class="string">build</span> <span class="string">xjar.go</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">sudo</span> <span class="string">mkdir</span> <span class="string">-p</span> <span class="string">$PACKAGE_PATHservice/</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">sudo</span> <span class="string">mv</span> <span class="string">-f</span> <span class="string">xjar.exe</span> <span class="string">$&#123;PACKAGE_PATH&#125;service/jwcloud.exe</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">sudo</span> <span class="string">mv</span> <span class="string">-f</span> <span class="string">*.xjar</span> <span class="string">$&#123;PACKAGE_PATH&#125;service/jwcloud.xjar</span></span><br><span class="line"><span class="comment">#  artifacts:</span></span><br><span class="line"><span class="comment">#    paths:</span></span><br><span class="line"><span class="comment">#      - &quot;target/jwcloud.exe&quot;</span></span><br><span class="line"><span class="comment">#      - &quot;target/jwcloud.xjar&quot;</span></span><br></pre></td></tr></table></figure>








      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/maven%E6%89%93%E5%8C%85/" rel="tag"># maven打包</a>
          
            <a href="/tags/xjar%E6%89%93%E5%8C%85/" rel="tag"># xjar打包</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/%E6%B5%8B%E8%AF%95%E6%80%9D%E7%BB%B4%E5%AF%BC%E5%9B%BE/2023/08/01/" rel="next" title="打包环境构建">
                <i class="fa fa-chevron-left"></i> 打包环境构建
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/sonar%E7%8E%AF%E5%A2%83%E9%83%A8%E7%BD%B2/2023/08/01/" rel="prev" title="sonar环境部署">
                sonar环境部署 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name"></p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/%20%7C%7C%20archive">
              
                  <span class="site-state-item-count">37</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                
                  <span class="site-state-item-count">8</span>
                  <span class="site-state-item-name">categories</span>
                
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                
                  <span class="site-state-item-count">43</span>
                  <span class="site-state-item-name">tags</span>
                
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%8E%AF%E5%A2%83%E6%9E%84%E5%BB%BA"><span class="nav-number">1.</span> <span class="nav-text">环境构建</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-%E5%AE%89%E8%A3%85go%E7%8E%AF%E5%A2%83"><span class="nav-number">1.1.</span> <span class="nav-text">1.安装go环境</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-%E5%AE%89%E8%A3%85java%E7%8E%AF%E5%A2%83"><span class="nav-number">1.2.</span> <span class="nav-text">2.安装java环境</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-%E5%AE%89%E8%A3%85maven"><span class="nav-number">1.3.</span> <span class="nav-text">3.安装maven</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-%E6%8E%88%E6%9D%83sudo%E5%85%8D%E5%AF%86%E6%89%A7%E8%A1%8C"><span class="nav-number">1.4.</span> <span class="nav-text">4.授权sudo免密执行</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BC%98%E5%8C%96%EF%BC%9A%E5%A2%9E%E5%8A%A0sonar%E6%89%AB%E6%8F%8F"><span class="nav-number">2.</span> <span class="nav-text">优化：增加sonar扫描</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">LZH</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
